How to let the function return a value:

function myFunction()
   {[...] ("Hello, have a nice day!")}

document.write(myFunction())